# Contributor: Bradley J Chambers <brad.chambers@gmail.com>
# Maintainer: Bradley J Chambers <brad.chambers@gmail.com>
pkgname=laz-perf
pkgver=1.4.4
pkgrel=0
pkgdesc="Alternative LAZ implementation for C++ and JavaScript"
url="https://github.com/hobu/laz-perf"
arch="all !armhf !armv7 !s390x !mips !mips64"  # armhf: io_test segfaults
license="LGPL-2.0-or-later"
makedepends="cmake python3-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/hobu/laz-perf/archive/$pkgver.tar.gz"

build() {
	cmake -B build \
	        -DCMAKE_INSTALL_PREFIX=/usr \
	        -DCMAKE_BUILD_TYPE=None \
	        -DWITH_TESTS=ON
	make -C build
}

check() {
	make -C build test
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="2d1016c7d477be2264a9df57b0df822d1e40de033763f12caba0b8a7267826f3278fdfadc81d6ee800a6110af1a53ed9c11ca8173b10dc6b848697c20a70b6eb  laz-perf-1.4.4.tar.gz"
